package com.tsc.design.strategyMode.example;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: chentl
 * @Date: 2025/09/17/20:54
 * @Description:
 */
public class CreditCardPayment implements PaymentStrategy{

    private String name;
    private String cardNumber;

    public CreditCardPayment(String name, String cardNumber) {
        this.name = name;
        this.cardNumber = cardNumber;
    }

    @Override
    public void pay(int amount) {
        System.out.printf("交易金额："+ amount);
        System.out.printf("信用卡卡号："+ cardNumber);
        System.out.printf("姓名："+ name);
    }
}
